<script setup>
import { ref } from 'vue'
import { useMessageStore } from '@/stores/message.js'
const store = useMessageStore()
</script>

<template>
  <section>
    <router-view></router-view>
    <van-tabbar route>
      <van-tabbar-item replace to="/" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/address" icon="location-o">附近</van-tabbar-item>
      <van-tabbar-item replace to="/cart" icon="cart-o">购物车</van-tabbar-item>
      <van-tabbar-item replace to="/user" icon="friends-o" :badge="store.count"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </section>
</template>

<style lang="less" scoped></style>
